package touch;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.Button;
import org.jaaksi.commondemo.util.LogUtil;

/**
 * 创建时间：2018年01月05日14:19 <br>
 * 作者：fuchaoyang <br>
 * 描述：
 */

public class MyButton extends Button {
  public MyButton(Context context) {
    super(context);
  }

  public MyButton(Context context, AttributeSet attrs) {
    super(context, attrs);
  }

  @Override public void draw(Canvas canvas) {
    super.draw(canvas);
  }

  @Override protected void onDraw(Canvas canvas) {
    LogUtil.i("touch","..onDraw");
    super.onDraw(canvas);
  }

  @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
    super.onLayout(changed, left, top, right, bottom);
    LogUtil.i("touch","..onLayout changed="+changed);
  }

  @Override public void layout(int l, int t, int r, int b) {
    super.layout(l, t, r, b);
  }

  @Override public boolean onTouchEvent(MotionEvent event) {
    //LogUtil.i("touch", "..onTouchEvent");
    return super.onTouchEvent(event);
  }
}
